<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢迎页面</title>
    <link href="static/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
        :root {
            --primary-color: #4e73df;
            --light-color: #f8f9fc;
        }

        body {
            font-family: 'Nunito', sans-serif;
            background-color: var(--light-color);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .welcome-container {
            text-align: center;
            padding: 2rem;
            background-color: #fff;
            border-radius: 0.35rem;
            box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
        }

        .welcome-header {
            font-size: 2rem;
            margin-bottom: 1.5rem;
            color: #5a5c69;
            font-weight: 700;
        }

        .welcome-buttons {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-primary:hover {
            background-color: #2e59d9;
            border-color: #2653d4;
        }
    </style>
</head>
<body>
<div class="welcome-container">
    <h1 class="welcome-header">欢迎来到我们的系统</h1>
    <div class="welcome-buttons">
<%--        <button class="btn btn-primary btn-lg" onclick="navigateToFrontend()">进入前台</button>--%>
        <button class="btn btn-primary btn-lg" onclick="navigateToBackend()">进入后台</button>
    </div>
    <button class="btn btn-danger btn-lg" onclick="logout()">退出</button>
</div>

<script src="static/bootstrap/jquery-3.5.1.slim.min.js"></script>
<script src="static/bootstrap/popper.min.js"></script>
<script src="static/bootstrap/bootstrap.min.js"></script>
<script>
    function navigateToFrontend() {
        window.open('frontend.jsp', '_blank');
    }

    function navigateToBackend() {
        window.open('backend.jsp', '_blank');
    }

    function logout() {
        localStorage.removeItem("user");
        window.location.href = '/login.jsp';
    }
</script>
</body>
</html>